﻿
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

using KSOAdmin.Models.Base;

namespace KSOAdmin.Models.DomainModels.System
{
    [Table("Sys_Log")]
    [Entity(TableCnName = "系统日志")]
    public class Sys_Log :ModelSign
    {
        [Key]
        [Display(Name = "ID")]
        [Column(TypeName = "int")]
        [Required(AllowEmptyStrings = false)]
        public int ID { get; set; }

        /// <summary>
        ///创建ID
        /// </summary>
        [Display(Name = "CreateID")]
        [Column(TypeName = "int")]
        public int? CreateID { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "注册时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        ///创建人
        /// </summary>
        [Display(Name = "创建人")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar(200)")]
        [Editable(true)]
        public string Create { get; set; }


        /// <summary>
        ///Success
        /// </summary>
        [Display(Name = "Success")]
        [Column(TypeName = "int")]
        public int? Success { get; set; }

        /// <summary>
        ///   程序时长 毫秒
        /// </summary>
        [Display(Name = "ElapsedTime")]
        [Column(TypeName = "int")]
        public int? ElapsedTime { get; set; }

        /// <summary>
        ///请求地址
        /// </summary>
        [Display(Name ="请求地址")]
       [MaxLength(10000)]
       [Column(TypeName="varchar(10000)")]
       public string Url { get; set; }

       /// <summary>
       ///日志类型
       /// </summary>
       [Display(Name ="日志类型")]
       [MaxLength(200)]
       [Column(TypeName= "varchar(200)")]
       public string LogType { get; set; }

       /// <summary>
       ///请求参数
       /// </summary>
       [Display(Name ="请求参数")]
       [MaxLength(10000)]
       [Column(TypeName="nvarchar(10000)")]
       public string RequestParameter { get; set; }

       /// <summary>
       ///响应参数
       /// </summary>
       [Display(Name ="响应参数")]
       [MaxLength(10000)]
       [Column(TypeName="nvarchar(10000)")]
       public string ResponseParameter { get; set; }

       /// <summary>
       ///异常信息
       /// </summary>
       [Display(Name ="异常信息")]
       [MaxLength(10000)]
       [Column(TypeName="nvarchar(10000)")]
       public string ExceptionInfo { get; set; }

       /// <summary>
       ///用户IP
       /// </summary>
       [Display(Name ="用户IP")]
       [MaxLength(300)]
       [Column(TypeName="varchar(300)")]
       public string UserIP { get; set; }

       /// <summary>
       ///浏览器类型
       /// </summary>
       [Display(Name ="浏览器类型")]
       [MaxLength(2000)]
       [Column(TypeName="nvarchar(2000)")]
       public string BrowserType { get; set; }

       /// <summary>
       ///角色ID
       /// </summary>
       [Display(Name ="角色ID")]
       [Column(TypeName="int")]
       public int? Role_Id { get; set; }
       
    }
}
